<template>
  <!-- 修改地址 -->
  <div>
    <van-nav-bar title="收货地址" left-arrow @click-left="onClickLeft" />

    <div class="box">
      <!-- 地区 -->
      <van-address-edit
        :area-list="areaList"
        show-set-default
        show-search-result
        :search-result="searchResult"
        :area-columns-placeholder="['请选择', '请选择', '请选择']"
        @save="onSave"
      />
    </div>
  </div>
</template>

<script>
import { areaList } from "@vant/area-data";

export default {
  data() {
    return {
      areaList,
      searchResult: [],
    };
  },
  methods: {
    onSave() {
      this.$toast("保存成功");
    },
    onClickLeft() {
      return this.$router.go(-1);
    },
  },
};
</script>

<style scoped>
:deep(.van-nav-bar .van-icon) {
  color: #000;
}
:deep(.van-button--danger) {
  border: 1px solid #ff691f;
  background-color: #ff691f;
}
:deep(.van-switch--on) {
  background-color: #ff691f;
}
:deep(.van-button--normal) {
  font-size: 16px;
}
</style>

<style lang="scss" scoped>
.box {
  margin-top: 15px;
}
</style>
